# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-precis-i18n
_pkgname=precis-i18n
pkgver=1.1.0
pkgrel=1
pkgdesc="Internationalized Usernames and Passwords"
url="https://github.com/byllyfish/precis_i18n"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$_pkgname-$pkgver.tar.gz::https://github.com/byllyfish/precis_i18n/archive/v$pkgver.tar.gz"
builddir="$srcdir"/${_pkgname/-/_}-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
b208f09ff13de45df1796dc3aea87d432e9e1fc1702ba9be65375c5bf410f0548947568abdfc9ddbbfa67fea27b5452e7bc53a8f054696808dc3fc680473ff1a  precis-i18n-1.1.0.tar.gz
"
